{include file=member.header.html}
<script>
//字数过滤
function focusText(obj) {
	$(obj).unbind('input propertychange');
	var temp = '';
	$(obj).bind('input propertychange', function() {
		var val = $(obj).val();
		if (val.length == 500) {
			temp = val;
		}
		if (val.length > 500) {
			$(obj).val(temp);
			window.alert('留言字数超限');
		}
	});
}
$(function(){
	$('#wlform').validate({
        errorPlacement: function(error, element) {
            element.parent().append(error);
        },
        rules: {
        	address_options:{
        		required: true
        	},
            message:{
            	required: true
            }
        },
        messages: {
        	address_options:{
        		required:'请选择退货地址'
        	},
            message:{
        		required:'留言不能为空'
        	}
        }
    });
});
</script>
<div class="content f-cb"> {include file=path.html}
  {include file=member.menu.html}
  <!-- 内容右边栏 -->
  <div class="con-r-global">
    <div class="sales-return-progress05"></div>
    <table width="100%" class="return-table-success">
      <tr>
        <td width="440">{$returns.add_time|date:Y-m-d H:i:s}</td>
        <td width="300">&nbsp;</td>
        <td width="296">&nbsp;</td>
      </tr>
    </table>
    <dl class="status">
      <dt>
        <h4>同意退货退款</h4>
      </dt>
      <dd>
        <form action="" method="post" id="wlform">
          <table class="return-table-content" width="100%">
            <tr>
              <td width="80" valign="top"><i>*</i> 退货地址：</td>
              <td><ul>
                  <!--{foreach from=$address_list item=address name=address}-->
                  <li>
                    <input id="address_{$address.addr_id}" type="radio" {if $smarty.foreach.address.index eq 0} checked="true" {/if} name="address_options" value="{$address.addr_id}" />
                    <label for="address_{$address.addr_id}">{$address.region_name|escape}{$address.address|escape}&nbsp;&nbsp;{$address.consignee|escape}&nbsp;&nbsp;{$address.phone_mob}&nbsp;&nbsp;{$address.phone_tel}</label>
                  </li>
                  <!--{/foreach}-->
                </ul></td>
            </tr>
            <tr>
              <td valign="top"><i>*</i> 留言：</td>
              <td><textarea name="message" placeholder="输入文本，字数在500字以内。" onfocus="focusText(this)"></textarea></td>
            </tr>
            <tr>
              <td align="center">&nbsp;</td>
              <td><input type="hidden" name="agree_type" value="2" /><input type="submit" value="提交并通知买家" class="subbtnhs" />
                <input type="button" onclick="javascript:history.go(-1);" value="取消并返回" class="btngray ml10" /></td>
            </tr>
          </table>
        </form>
      </dd>
    </dl>
    <div class="return-div-success">
      <!--退货退款日志-->
      <!--{if $returns_log}-->
      <dl class="info">
        <dt>
          <h4>跟踪信息</h4>
        </dt>
        <dd>
          <table width="100%">
            <tr>
              <td width="200" class="gray">处理时间</td>
              <td width="580" class="gray">处理信息</td>
              <td width="94" class="gray">操作人</td>
            </tr>
            <!--{foreach from=$returns_log item=log}-->
            <tr>
              <td>{$log.log_time|date:Y-m-d H:i:s}</td>
              <td><p>{$log.remark|escape}</p></td>
              <td>{$log.operator|escape}</td>
            </tr>
            <!--{/foreach}-->
          </table>
        </dd>
      </dl>
      <!--{/if}-->
      <!--退货退款申请信息-->
      <dl class="info">
        <dt>
          <h4>
            <!--{if $returns.type eq 1}-->
            退款详情
            <!--{/if}-->
            <!--{if $returns.type eq 2}-->
            退货详情
            <!--{/if}-->
          </h4>
        </dt>
        <dd>
          <table class="mb25" width="100%">
            <tr>
              <td width="105" class="pdl50"><a href="{jsurl app=goods&id=$returns.goods_id}" title="{$returns.goods_name|escape}" target="_blank"><img src="{$returns.goods_image}" alt="{$returns.goods_name|escape}" width="100" height="100" /></a></td>
              <td><p class="title"><a href="{jsurl app=goods&id=$returns.goods_id}" title="{$returns.goods_name|escape}" target="_blank" class="linkbtn">{$returns.goods_name|escape}</a></p>
                <p>购物数量：<i id="quantity">{$returns.goods_quantity}</i></p>
                <!--{if $returns.specification}-->
                <p>{$returns.specification|escape}</p>
                <!--{/if}--></td>
            </tr>
          </table>
          <table class="return-table-content mb30" width="100%">
            <tr>
              <td width="100" class="pdl50"><!--{if $returns.type eq 1}-->
                退款商品数：
                <!--{/if}-->
                <!--{if $returns.type eq 2}-->
                退货商品数：
                <!--{/if}--></td>
              <td>{$returns.quantity}件</td>
            </tr>
            <tr>
              <td class="pdl50"><!--{if $returns.type eq 1}-->
                退款原因：
                <!--{/if}-->
                <!--{if $returns.type eq 2}-->
                退货原因：
                <!--{/if}--></td>
              <td> {$returns.returns_reason|escape} </td>
            </tr>
            <!--{if $returns.returns_explain}-->
            <tr>
              <td class="pdl50">补充说明：</td>
              <td><p style="width:600px;">{$returns.returns_explain|escape}</p></td>
            </tr>
            <!--{/if}-->
            <!--{if $returns.returns_img}-->
            <tr>
              <td class="pdl50">相关图片：</td>
              <td><ul class="imgs f-cb" >
                  <!--{foreach from=$returns.returns_img item=img}-->
                  <li><img src="{$img}" alt="" width="60" height="60" /></li>
                  <!--{/foreach}-->
                </ul></td>
            </tr>
            <!--{/if}-->
            <tr>
              <td class="pdl50">需退商品金额：</td>
              <td><span class="coe6">{$returns.goods_amount}</span> 元 </td>
            </tr>
            <!--{if $returns.shipping_fee}-->
            <tr>
              <td class="pdl50">需退运费：</td>
              <td><span class="coe6">{$returns.shipping_fee}</span> 元 </td>
            </tr>
            <!--{/if}-->
          </table>
        </dd>
      </dl>
    </div>
  </div>
</div>
{include file=footer.html} 